Skip to content

Brussels | ITP-2026-1 | Nik | Sprint 2 | Week 8#121

Open
bezdzenariy wants to merge 4 commits intoHackYourFutureBelgium:mainfrom
bezdzenariy:coursework/sprint-2
Open

Brussels | ITP-2026-1 | Nik | Sprint 2 | Week 8#121
bezdzenariy wants to merge 4 commits intoHackYourFutureBelgium:mainfrom
bezdzenariy:coursework/sprint-2

Conversation

@bezdzenariy
Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • titled PR
  • changes meet the requirements of the task
  • tested changes
  • changes follow the style guide

Changelist

Sprint-2 (Week 8-9): Objects & Testing

Implement:

  • contains.js — Check object property existence using 'in' operator
  • lookup.js — Create lookup object from key-value pairs with destructuring
  • querystring.js — Parse URL query strings (fixed indexOf bug)
  • tally.js — Count element frequency with tally pattern

Interpret:

  • invert.js — Swap object keys/values (fixed typeof typo and bracket notation)

Stretch:

  • count-words.js — Word frequency counter with regex /[^\w\s]/g
  • mode.js — Refactored calculateMode into helper functions
  • till.js — Calculate total in pounds (fixed parseInt conversion)

Tests:

  • 8 test suites, all passing
  • 15+ tests in stretch/
  • Edge cases: empty inputs, type validation, special characters

Key Learnings:

  • typeof returns 7 string literals
  • Bracket notation obj[key] vs dot notation obj.key
  • Regex for text processing
  • Tally pattern: obj[key] = (obj[key] || 0) + 1

Questions

No questions at this time.

@bezdzenariy bezdzenariy changed the title Brussels | ITP-2026-1 | Nik | Sprint 2 | Week 8-9 Brussels | ITP-2026-1 | Nik | Sprint 2 | Week 8 Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant